import pandas as pd
from sklearn import linear_model

df = pd.read_csv('heart.csv')

x = df[['age', 'sex', 'cp', 'trestbps', 'chol', 'fbs', 'restecg', 'thalach', 'exang', 'oldpeak', 'slope', 'ca', 'thal']]
y = df['target']

train_x = x[:80]
train_y = y[:80]
test_x = x[80:]
test_y = y[80:]

regr = linear_model.LinearRegression()
regr.fit(train_x, train_y)

print(regr.predict(test_x))
